
public class RulePiece {

	
	String pieceType;
	String pieceContent;
	
	int lineNumber;
	
	
	public RulePiece(String type, String content, int lineNumber){
		pieceType = type;
		pieceContent = content;
		while(pieceContent.charAt(pieceContent.length()-1)==' '||pieceContent.charAt(pieceContent.length()-1)=='\n'){
			pieceContent=pieceContent.substring(0, pieceContent.length()-1);
		}
		
		
		this.lineNumber = lineNumber;
	}
	
	public int getLineNumber(){
		return lineNumber;
	}
	
	public String getType(){
		
		return pieceType;
	}
	
	public String getContent(){
		
		return pieceContent;
	}
	
	public String toString(){
		
		return getType() + " "+getContent();
	}
	
	
	
}
